struct Box
{
	int x, y;
	int width, height;

	float vx, vy;

	Box(int x, int y, float w, float h)
	{
		this->x = x;
		this->y = y;

		width = w;
		height = h;

		vx = vy = 0.0f;
	}

	Box(int x, int y, float w, float h, float vx, float vy)
	{
		this->x = x;
		this->y = y;

		width = w;
		height = h;

		this->vx = vx;
		this->vy = vy;
	}
};

DIR isCollision(Box box1, Box box2)
{
	int l = box2.x - (box1.x + box1.width);
	int r = box1.x - (box2.x + box2.width);
	int t = box1.y - box1.height - box2.y;
	int b = box2.y - box2.height - box1.y;

	if (l < 0) return DIR::LEFT;
	if (r < 0) return DIR::RIGHT;
	if (t < 0) return DIR::TOP;
	if (b < 0) return DIR::BOTTOM;

	return DIR::NONE;
}

enum DIR
{
	NONE = 0,
	LEFT,
	RIGHT, 
	TOP,
	BOTTOM
};